package com.cizzy.user.entity.dto;

import com.cizzy.user.entity.UserCount;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.cizzy.user.entity.User;

import java.util.Collections;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserHomeDTO {
    private Long userId;

    private String avatar;

    private String nickname;

    private String signature;

    private Long followCount;

    private Long followerCount;

    private List<VideoDTO> videoList;

    public void convertFromUser(User user) {
        this.userId = user.getUserId();
        this.avatar = user.getAvatar();
        this.nickname = user.getNickname();
        this.signature = user.getSignature();
    }

    public void convertFromUserCount(UserCount userCount) {
        this.followCount = userCount.getFollowCount();
        this.followerCount = userCount.getFollowerCount();
    }

    public void convertFromVideoList(List<VideoDTO> videoList) {
        this.videoList = videoList;
    }
}
